package com.ikan.positionserver.listener;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import com.ikan.positionserver.exceldo.TenantHostDO;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.compress.utils.Lists;

import java.util.List;

@Slf4j
@Data
public class TenantHostListener extends AnalysisEventListener<TenantHostDO> {
    private List<TenantHostDO> tenantHostDOList = Lists.newArrayList();

    @Override
    public void invoke(TenantHostDO tenantHostDO, AnalysisContext analysisContext) {
        this.tenantHostDOList.add(tenantHostDO);
    }


    @Override
    public void doAfterAllAnalysed(AnalysisContext context) {
        log.info("解析租户端云主机完毕");
    }
}
